package com.sky.web.app;

import com.sky.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/shop")
public class AppShopController {
    @Autowired
    private RedisTemplate redisTemplate;

    @GetMapping("{status}")
    public Result getShopStatus() {
        ValueOperations valueOperations = redisTemplate.opsForValue();
        Object shop_status = valueOperations.get("shop_status");
        return Result.success(shop_status);
    }
}